﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LINQtoQIF
{
    public class QifContext
    {
        public IList<T> Read<T>(string filePath) where T : IQifTransaction
        {
            StreamReader reader = new StreamReader(filePath);

            QifStream stream = new QifStream(reader);
            var transactions = new List<T>();
            stream.ReadTransactions<T>(ref transactions);
            return transactions;
        }
    }
}
